#!/bin/bash

# Bootstrap para genrecia-snmp monitor

# Dependencias
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config zlib1g-dev openssl

# Baixa o rvm
curl -L https://get.rvm.io | bash -s stable
. $HOME/.rvm/scripts/rvm

# Baixa e compila o ruby, cria um gemset para o monitor
rvm install ruby-1.9.3
rvm use 1.9.3
#rvm gemset create gerencia-snmp-monitor
rvm use 1.9.3@gerencia-snmp-monitor --default

# Baixa o rails e as dependencias
gem install rails --no-rdoc --no-ri
bundle install
